<!DOCTYPE html>
<!--[if IE 9]>         <html class="no-js lt-ie10" lang="en"> <![endif]-->
<!--[if gt IE 9]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">

        <title>ProUI - Responsive Bootstrap Admin Template</title>

        <meta name="description" content="ProUI is a Responsive Bootstrap Admin Template created by pixelcave and published on Themeforest.">
        <meta name="author" content="pixelcave">
        <meta name="robots" content="noindex, nofollow">
        <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=0">

        <!-- Icons -->
        <!-- The following icons can be replaced with your own, they are used by desktop and mobile browsers -->
        <link rel="shortcut icon" href="img/favicon.png">
        <link rel="apple-touch-icon" href="img/icon57.png" sizes="57x57">
        <link rel="apple-touch-icon" href="img/icon72.png" sizes="72x72">
        <link rel="apple-touch-icon" href="img/icon76.png" sizes="76x76">
        <link rel="apple-touch-icon" href="img/icon114.png" sizes="114x114">
        <link rel="apple-touch-icon" href="img/icon120.png" sizes="120x120">
        <link rel="apple-touch-icon" href="img/icon144.png" sizes="144x144">
        <link rel="apple-touch-icon" href="img/icon152.png" sizes="152x152">
        <link rel="apple-touch-icon" href="img/icon180.png" sizes="180x180">
        <!-- END Icons -->

        <!-- Stylesheets -->
        <!-- Bootstrap is included in its original form, unaltered -->
        <link rel="stylesheet" href="/res1/css/bootstrap.min.css">

        <!-- Related styles of various icon packs and plugins -->
        <link rel="stylesheet" href="/res1/css/plugins.css">

        <!-- The main stylesheet of this template. All Bootstrap overwrites are defined in here -->
        <link rel="stylesheet" href="/res1/css/main.css">

        <!-- Include a specific file here from /res1/css/themes/ folder to alter the default theme of the template -->

        <!-- The themes stylesheet of this template (for using specific theme color in individual elements - must included last) -->
        <link rel="stylesheet" href="/res1/css/themes.css">
        <!-- END Stylesheets -->

        <!-- Modernizr (browser feature detection library) -->
        <script src="/res1/js/vendor/modernizr.min.js"></script>
    </head>
    <body>
        <!-- Login Background -->
        
        <!-- END Login Background -->

        <!-- Login Container -->
        <div id="login-container" class="animation-slideDown">
            <!-- Login Title -->
            <div class="login-title text-right">
                <h1>
                    
                    <strong>${username}</strong> ${email}<br>
                    
                </h1>
            </div>
            <!-- END Login Title -->

            <!-- Login Block -->
            <div class="block">
                <form  class="form-horizontal push">
                    <div class="form-group">
                        <div class="col-xs-12">
                            <div class="input-group">
                                <input type="password" id="password" name="lock-password" class="form-control" placeholder="Password">
                                <div class="input-group-btn">
                                    <button type="button" id="loginBtn" class="btn btn-primary"><i class="fa fa-unlock-alt"></i> Unlock</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
                <p class="text-center">
                    <a href="../login.html"><small>Not ${username}?</small></a>
                </p>
            </div>
            <!-- END Login Block -->
        </div>
        <!-- END Login Container -->

        <!-- jQuery, Bootstrap.js, jQuery plugins and Custom JS code -->
        <script src="/res1/js/vendor/jquery.min.js"></script>
        <script src="/res1/js/vendor/bootstrap.min.js"></script>
        <script src="/res1/js/plugins.js"></script>
        <script src="/res1/js/app.js"></script>
        <script>

    jQuery(document).ready(function () {

        

        $("#loginBtn").click(function (data) {
            var username = '${username}';
            var pwd = $("#password").val();
            if (username == '' || pwd == '') {
                //layer.msg("信息不完整");
                return;
            }
            $.post('/service/user/loginto',
                    {
                        username: username,
                        password: pwd
                    },
                    function (data, textStatus, xhr) {
                        var r = JSON.stringify(data);
                        if (r.indexOf("suc") != -1) {
                            window.location.href = "/";
                        } else {
                            alert("登录失败");
                        }
                    });
        });

    });

</script>
    </body>
</html>